%Plots of individual regions
clear;
qprint=1;

scrsz = get(groot,'ScreenSize');
load ../collect_all.mat All;
addpath ../../../tools/
addpath ..
addpath alt %alternate plotting codes for regions with different data formats

for ctr=1:17;
    close all;
    
    R=region_data_all(ctr);
    R.name,
         
    if 1 & ctr<=16,
        %draw regional maps
        h=figure(4); set(h,'Position',[1 scrsz(4)/2 scrsz(3)/2 scrsz(4)/2]);
        clf; hold on;
        if ctr==7 || ctr==3 || ctr==5
            transect_map_full_alt(ctr,All);
        else 
            transect_map_full(ctr,All);
        end 
        drawnow;
        if qprint,
            %eval(['print -dpng transects/',num2str(ctr),'/map.png']);
            eval(['print -dpng ../../../../supp_figs/obs/',num2str(ctr),'/map.png']);
        end;
    end;
    
    %distance vs. magnetics
    if R.has_mags==1,
        h=figure(1); set(h,'Position',[scrsz(3)/2 scrsz(4)/2 scrsz(3)/2 scrsz(4)/2]);
        clf; hold on;
        if ctr==7
            transect_magnetics_alt(ctr,All); 
        else 
            transect_magnetics(ctr,All);
        end 
        if qprint,
            eval(['print -dpng transects/',num2str(ctr),'/magnetics.png']);
        end;
    end;

    
    %distance vs. bathymetry
    if ctr~=17
    h=figure(2); set(h,'Position',[1 1 scrsz(3)/2 scrsz(4)/2]);
    clf; hold on;
    if ctr==7
        transect_bathymetry_alt(ctr,All);
    else
        transect_bathymetry(ctr,All);
    end
    if qprint,
        eval(['print -dpng transects/',num2str(ctr),'/bathymetry.png']);
    end;
    else
        transect_jdf
    end

    %time vs. filtered bathymetry
    h=figure(3); set(h,'Position',[scrsz(3)/2 1 scrsz(3)/2 scrsz(4)/2]);
    clf; hold on;
    transect_bathymetry_filtered(ctr,All);
    orient landscape;
    drawnow;
    if qprint,
        eval(['print -dpng transects/',num2str(ctr),'/bathymetry_filtered.png']);
    end;
    
end;
